package cn.com.backstage.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import cn.com.api.entity.ApiU_circle_member;
import cn.com.api.service.ApiU_circle_memberService;
import cn.com.backstage.controller.base.U_circle_memberBaseController;

import cn.com.util.*;

@Controller
@RequestMapping(Utils.SYS_BACKSTAGE)
public class U_circle_memberController extends U_circle_memberBaseController {

	private static Logger logger = Logger.getLogger(U_circle_memberController.class);

	@Autowired
	private ApiU_circle_memberService apiU_circle_memberService;

	/**
	 * 查看圈子成员列表
	 * 
	 * @return
	 */
	@RequestMapping(value = "circlememberlist")
	public ModelAndView circlememberlist(HttpServletRequest request, HttpServletResponse response, PageInfo pageInfo)
			throws Exception {
		ModelAndView mv = new ModelAndView("forward:/backstage/circle_member_list.jsp");
		Map<String, Object> paramMap = new HashMap<String, Object>();
		String circle_id = request.getParameter("circle_id");
		paramMap.clear();
		paramMap.put("circle_id", circle_id);
		paramMap.put("status", "1");// 同意的成员
		pageInfo.setShowCount(10000);
		List<ApiU_circle_member> list = apiU_circle_memberService.getcirclemembersListPage(paramMap, pageInfo);
		mv.addObject("list", list);
		return mv;
	}

}
